package com.example.yangyang.menudialogtest_125yy;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MenuInflater;
import android.widget.TextView;

public class   MainActivity extends AppCompatActivity {
private TextView twinfo,tvmenu;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
    }

    private void init() {
        tvinfo=(TextView)findViewById(R.id.textView);
        tvmenu=()
    }
    //创建选项菜单和子菜单
}
    @Override
public  boolean onCreaterOptionsMenu(Menu menu){
        MenuInflater
}
public  boolean